package com.lsf.action;

import java.util.List;

import com.lsf.po.User;
import com.lsf.service.UserService;
import com.opensymphony.xwork2.ActionSupport;

/**

 * 创建日期：2013-3-6下午01:28:39

 * 修改日期：

 * 作者：刘帅飞

 */

public class FindUserAction extends ActionSupport{
	private int popedom;				//权限  （1）popedom通过页面传值初始化
	private List<User> allUser;		//用户列表   （2）allUser通过execute（）内自己初始化
	private UserService userService;	//用户业务接口引用  （3）userService通过spring容器（applicationContext.xml）初始化
	public void setUserService(UserService userService) {
		this.userService = userService;
	}
//	public UserService getUserService(){
//		return userService;
//	}
	public List<User> getAllUser() {
		return allUser;
	}
	public void setAllUser(List<User> allUser) {
		this.allUser = allUser;
	}
	public int getPopedom() {
		return popedom;
	}
	public void setPopedom(int popedom) {
		this.popedom = popedom;
	}
	public String execute() throws Exception {
		allUser = userService.findAllUser(popedom);	//调用查找所有用户业务方法
		return SUCCESS;
	}
}
